package cn.pzhu.java.ch04.mycontainer;

import java.util.List;


public class TestDemo {

	public static void main(String[] args) {
		StudentContainer.IsDebug=true;//log4j
		Student s1=new Student(1, "zhang3");
		Student s2=new Student(2, "Li4");
		Student s3=new Student(3, "wang5");
		Student s4=new Student(4, "zhang4");
		Student s5=new Student(5, "Li5");
		Student s6=new Student(6, "wang6");
		StudentContainer container=new StudentContainer();
		
		container.addGroup("GroupA");
		container.addGroup("GroupB");
		container.addGroup("GroupC");
		
		container.addStudent("GroupA", s1);
		container.addStudent("GroupA", s2);
		container.addStudent("GroupA", s3);	
		container.addStudent("GroupB", s4);
		container.addStudent("GroupB", s5);
		container.addStudent("GroupC", s6);
		//container.showGroups();
		//container.showStudents("GroupA");
	//	container.showStudents();
		
		//Student s=container.findById(9);
		//System.out.println(s);
		
		/*List<Student> foundStus=container.findByName("li");
		for(Student stu:foundStus){
			System.out.println(stu);
		}*/
		container.showStudents("GroupC");
		//Student s=container.findById(1);
		//s.setName("lklkdsflsdklfd");
		container.delStudentById(6);
		container.showStudents("GroupC");
	}

}
